/*
 * ============LICENSE_START=======================================================
 *  Copyright (C) 2021 Nordix Foundation
 *  ================================================================================
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 *  SPDX-License-Identifier: Apache-2.0
 *  ============LICENSE_END=========================================================
 */

@import '../../../../../../../assets/styles/variables.less';
@import '../../../../../../../assets/styles/override.less';

.operation-creator-interface-definition {
  font-family: @font-opensans-regular;
  user-select: none;
  padding-top: 12px;
  padding-bottom: 20px;

  .i-sdc-form-label {
    font-size: 12px;
  }

  .w-sdc-form .i-sdc-form-item {
    margin-bottom: 15px;
  }

  textarea {
    min-height: 74px;
    margin-bottom: 18px;
  }

  /deep/ .sdc-dropdown__component-container {
    .sdc-dropdown__header {
      height: 38px;
      line-height: 35px;

      svg-icon {
        margin: 13px 6px;
      }
    }
  }

  /deep/ .sdc-input {
    margin-bottom: 0;

    .sdc-input__input {
      height: 38px;
    }
  }

  .side-by-side {
    display: flex;

    .form-item {
      flex: 1;

      &:first-child {
        margin-right: 14px;
        flex-basis: 37%;
        flex-grow: 0;
        flex-shrink: 0;
      }

      &:nth-child(3) {
        margin-left: 14px;
        flex: 0.4;
      }

      .i-sdc-form-file-upload {
        height: 37px;
        margin-bottom: 0;

        .i-sdc-form-file-name {
          padding: 8px 10px;
        }

        .i-sdc-form-file-upload-x-btn {
          top: 13px;
        }

        .file-upload-browse-btn {
          height: 100%;
          padding: 7px 6px;
          z-index: 1;
        }
      }

    }
  }

  .archive-warning {
    font-family: @font-opensans-bold;
    color: @main_color_i;
  }

  .no-workflow-warning {
    font-family: @font-opensans-bold;
    color: @sdcui_color_red;
    float: right;
  }

  .input-param-title {
    font-size: 16px;
    text-transform: uppercase;
  }

  .separator-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;

    .add-param-link {
      &:not(.disabled):hover {
        cursor: pointer;
      }
    }

    .tab {
      width: 84px;
      text-align: center;
    }
  }

  .generic-table {
    max-height: 244px;
    min-height: 91px;
    background: @main_color_p;

    .header-row .header-cell {
      .info-icon {
        float: right;
        position: relative;
        top: 2px;
      }
      /deep/ .tooltip-inner {
        padding: 2px;
        max-width: 270px;
        font-size: 11px;
      }
      &.remove {
        padding: 10px;
        font-size: 10px;
      }
    }

    .data-row {
      &.empty-msg {
        .bold-message {
          font-family: @font-opensans-bold;
        }

        :first-child {
          &:not(:only-child) {
            margin: 6px 0;
          }
        }

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 14px;
      }
    }

    /deep/ .cell {
      &.field-name, &.field-type {
        flex: 1;
      }

      &.field-property {
        &, &:last-child {
          flex: 1;
        }
      }

      &.field-mandatory {
        flex: 0.5;
        text-align: center;
      }

      &.remove {
        min-width: 40px;
        max-width: 40px;
      }
    }

  }

  .create-interface-operation-footer {
    border-top: solid 1px #eaeaea;
    padding: 10px;
    margin: 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    sdc-button {
      margin: 0 5px;
    }
  }
}
